AuthCollection

@Serializable
open class AuthCollection(val authRule: String? = null, val manageRule: String? = null, val authAlert: AuthCollection.AuthAlertOptions? = null, val oauth2: AuthCollection.OAuth2Options? = null, val passwordAuth: AuthCollection.PasswordAuthOptions? = null, val mfa: AuthCollection.MFAOptions? = null, val otp: AuthCollection.OTPOptions? = null, val authToken: <Error class: unknown class>? = null, val passwordResetToken: <Error class: unknown class>? = null, val emailChangeToken: <Error class: unknown class>? = null, val verificationToken: <Error class: unknown class>? = null, val fileToken: <Error class: unknown class>? = null, val verificationTemplate: AuthCollection.EmailTemplate? = null, val resetPasswordTemplate: AuthCollection.EmailTemplate? = null, val confirmEmailChangeTemplate: AuthCollection.EmailTemplate? = null) : Collection

This class contains the fields found in auth collections, extend it if you want to view these fields.

Parameters

authRule

This rule is executed every time before authentication allowing you to restrict who can authenticate.

manageRule

This rule is executed in addition to the create and update API rules. It enables superuser-like permissions to allow fully managing the auth record(s), eg. changing the password without requiring to enter the old one, directly updating the verified state or email, etc.

authAlert

whether or not to send emails to users notifying them that they logged in on a new ip.

oauth2

Options for oauth2.

passwordAuth

Options for password authentication.

mfa

Options for MFA.

otp

Options for OTP authentication.

authToken

The expiration time of a user's auth token.

passwordResetToken

The expiration time of a user's password reset token.

emailChangeToken

The expiration time of a user's email change token.

verificationToken

The expiration time of a user's verification token.

fileToken

The expiration time of a file token

verificationTemplate

The email template used when sending a verification email

resetPasswordTemplate

The email template used when sending a password reset email.

confirmEmailChangeTemplate

The email template used when sending an email change confirmation email.

Constructors

Link copied to clipboard
constructor(authRule: String? = null, manageRule: String? = null, authAlert: AuthCollection.AuthAlertOptions? = null, oauth2: AuthCollection.OAuth2Options? = null, passwordAuth: AuthCollection.PasswordAuthOptions? = null, mfa: AuthCollection.MFAOptions? = null, otp: AuthCollection.OTPOptions? = null, authToken: <Error class: unknown class>? = null, passwordResetToken: <Error class: unknown class>? = null, emailChangeToken: <Error class: unknown class>? = null, verificationToken: <Error class: unknown class>? = null, fileToken: <Error class: unknown class>? = null, verificationTemplate: AuthCollection.EmailTemplate? = null, resetPasswordTemplate: AuthCollection.EmailTemplate? = null, confirmEmailChangeTemplate: AuthCollection.EmailTemplate? = null)

Types

Link copied to clipboard
@Serializable
data class AuthAlertOptions(val enabled: Boolean? = null, val emailTemplate: AuthCollection.EmailTemplate? = null)

Used to configure an auth collection's auth alert function.

Link copied to clipboard
@Serializable
data class EmailTemplate(val subject: String? = null, val body: String? = null)

Used to describe a Pocketbase email template.

Link copied to clipboard
@Serializable
data class MFAOptions(val enabled: Boolean? = null, val duration: <Error class: unknown class>? = null, val rule: String? = null)
Link copied to clipboard
@Serializable
data class OAuth2Options(val enabled: Boolean? = null, val providers: List<JsonElement>, val mappedFields: List<JsonElement>)
Link copied to clipboard
@Serializable
data class OTPOptions(val enabled: Boolean? = null, val duration: <Error class: unknown class>? = null, val length: Int? = null, val emailTemplate: AuthCollection.EmailTemplate? = null)
Link copied to clipboard
@Serializable
data class PasswordAuthOptions(val enabled: Boolean? = null, val identityFields: List<String>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val authRule: String? = null
Link copied to clipboard
val authToken: <Error class: unknown class>? = null
Link copied to clipboard
val created: <Error class: unknown class>? = null
Link copied to clipboard
val createRule: String? = null
Link copied to clipboard
val deleteRule: String? = null
Link copied to clipboard
val emailChangeToken: <Error class: unknown class>? = null
Link copied to clipboard
val fields: List<SchemaField>? = null
Link copied to clipboard
val fileToken: <Error class: unknown class>? = null
Link copied to clipboard
open val id: String? = null
Link copied to clipboard
val indexes: List<String>? = null
Link copied to clipboard
val listRule: String? = null
Link copied to clipboard
val manageRule: String? = null
Link copied to clipboard
Link copied to clipboard
val name: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val passwordResetToken: <Error class: unknown class>? = null
Link copied to clipboard
val system: Boolean? = null
Link copied to clipboard
Link copied to clipboard
val updated: <Error class: unknown class>? = null
Link copied to clipboard
val updateRule: String? = null
Link copied to clipboard
val verificationToken: <Error class: unknown class>? = null
Link copied to clipboard
val viewRule: String? = null

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String